package net.apps.std.spi;

import java.awt.Image;
import java.awt.im.spi.InputMethod;
import java.awt.im.spi.InputMethodDescriptor;
import java.util.Locale;

public class RemoteInputMethodDescriptor implements InputMethodDescriptor {

	private static Locale REMOTE_LOCALE = new Locale("remote");

	public RemoteInputMethodDescriptor() {
	}

	/**
	 * @see java.awt.im.spi.InputMethodDescriptor#getAvailableLocales
	 */
	public Locale[] getAvailableLocales() {
		Locale[] locales = { REMOTE_LOCALE };
		return locales;
	}

	/**
	 * @see java.awt.im.spi.InputMethodDescriptor#hasDynamicLocaleList
	 */
	public boolean hasDynamicLocaleList() {
		return false;
	}

	/**
	 * @see java.awt.im.spi.InputMethodDescriptor#getInputMethodDisplayName
	 */
	public synchronized String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) {
		return "Remote Input Method";
	}

	/**
	 * @see java.awt.im.spi.InputMethodDescriptor#getInputMethodIcon
	 */
	public Image getInputMethodIcon(Locale inputLocale) {
		return null;
	}

	/**
	 * @see java.awt.im.spi.InputMethodDescriptor#createInputMethod
	 */
	public InputMethod createInputMethod() throws Exception {
		return new RemoteInputMethod();
	}
}
